﻿namespace Server
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Runtime.Serialization;
    using System.Web;

    /// <summary>
    /// Категория для отображения
    /// </summary>
    [DataContract]
    public class CategoryAll
    {

        #region INullable Members

        private bool m_Null = false;

        public bool IsNull
        {
            get { return m_Null; }
        }

        public static CategoryAll Null
        {
            get
            {
                return new CategoryAll(0)
                {
                    m_Null = true
                };
            }
        }

        #endregion

        /// <summary>
        /// Id элемента
        /// </summary>
        [DataMember]
        public int Id { get; set; }

        /// <summary>
        /// Id родительской категории
        /// </summary>
        [DataMember]
        public int? ParentId { get; set; }

        /// <summary>
        /// Полный url к изображению
        /// </summary>
        [DataMember]
        public string Image { get; set; }

        /// <summary>
        /// List of categories localizations
        /// </summary>
        [DataMember]
        public List<CategoryLocalizationModel> Localizations;

        /// <summary>
        /// Конструктор
        /// </summary>
        /// <param name="id">Id категории</param>
        public CategoryAll(int id)
        {
            this.Id = id;
        }
    }
}